option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['监测值', '规划值']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: ${recentYear},
axisTick: {
alignWithLabel: true
}
}
],
yAxis: {
type: 'value',
name: '${unit}'
},
series: [
{
name: '监测值',
type: 'bar',
barWidth: '30%',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 1, color: '#83bff6' },
{ offset: 0.5, color: '#188df0' },
{ offset: 0, color: '#188df0' }
])
},
data: ${monitorValue}
},
{
name: '规划值',
type: 'line',
lineStyle: {
color: 'orange',
width: 2
},
smooth: true,
data: ${targetValue}
}
]
}